import { message } from "antd"
import { useNavigate } from "react-router-dom"

const View=()=> {
  const navgiateto=useNavigate()
  const exit=()=>{
localStorage.removeItem('token')
navgiateto('/login')
message.success('退出成功',2)
  }
  return (
    <div><button onClick={exit}>exit</button></div>
  )
}

export default View